package com.sgb.capital.view.ui.adapter;

import com.sgb.capital.R;
import com.sgb.capital.model.DepositBean;
import com.sgb.capital.utils.Utils;
import com.sgb.capital.view.widget.BaseRecyclerViewAdapterHelper.BaseQuickAdapter;
import com.sgb.capital.view.widget.BaseRecyclerViewAdapterHelper.viewholder.BaseViewHolder;

import java.util.List;

/**
 * 作者:张磊
 * 日期:2022/1/14 0014
 * 说明:保证金item
 */
public class PledgeAdapter extends BaseQuickAdapter<DepositBean, BaseViewHolder> {

    public PledgeAdapter(List<DepositBean> beans) {
        super(R.layout.pledge_adapter, beans);
    }

    @Override
    protected void convert(BaseViewHolder helper, final DepositBean item) {
        if (getData().size() == 0) {
            return;
        }
        helper
                .setText(R.id.tv_title,item.projectName)
                .setText(R.id.tv_company,item.companyName)
                .setText(R.id.tv_price, Utils.getDecimalFormat(item.cashDeposit)+"元")
                .setText(R.id.tv_time, Utils.getTime(item.cashDepositEndTime));
    }
}
